Conditions | 2 |
Paths | 1 |
Total Lines | 27 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | jQuery(document).ready(function() { |
||
9 | wpapi_gmaps.forEach(function(single_gmap, index){ |
||
10 | var mapCanvas = document.getElementById('wpapi-gmap-' + index); |
||
11 | var myLatLng = new google.maps.LatLng( single_gmap.lat , single_gmap.lng ); |
||
12 | var map_style = JSON.parse(single_gmap.style); |
||
13 | var map_zoom = single_gmap.scrollwheel ? false : true; |
||
14 | |||
15 | var mapOptions = { |
||
16 | center: myLatLng, |
||
17 | zoom: Number(single_gmap.zoom), |
||
18 | scrollwheel: map_zoom, |
||
19 | mapTypeId: google.maps.MapTypeId.ROADMAP, |
||
20 | styles: map_style |
||
21 | } |
||
22 | |||
23 | var marker = new google.maps.Marker({ |
||
24 | position: myLatLng |
||
25 | }); |
||
26 | |||
27 | var infoContent = single_gmap.info; |
||
28 | var infowindow = new google.maps.InfoWindow({ |
||
29 | content: infoContent |
||
30 | }); |
||
31 | |||
32 | var map = new google.maps.Map(mapCanvas, mapOptions); |
||
33 | marker.setMap(map); |
||
34 | infowindow.open(map, marker); |
||
35 | }); |
||
36 | } |
||
37 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.